<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>async延时函数</title>
</head>
<body>
    
</body>
<script src="./js/PromiseAjax.js"></script>
<script>
    function delay(time){
        return new Promise(resolve=>{
            setTimeout(() => {
                resolve()
            }, time);
        })
    }
    async function getintime(){
        for (const iterator of ['jimmy','ysh','helliworld']) {
            await delay(2000)
            console.log(iterator)
        }
    }
    getintime()
</script>
</html>